home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
5
/
TCLTYP.R
< prev
next >
Wrap
Text File
|
1991-10-05
|
17KB
|
528 lines
/*
* TCLTypes.r
* Copyright ) 1991 Frederic F. Anderson
* All rights reserved. Usage as source code is freely permitted,
* but commercial distribution of this file is prohibited.
* Send me work! Call 317/257-2227
*
* Certain #defines and comments Copyright )J1989-91 Symantec Corporation
* This is not a product of Symantec Corporation.
* Caveat City:
* This file covers only the types I use, and has been tested only
to the extent I use it myself. Some constants may or may not work
as their name implies: For instance, I believe attaching a CPaneBorder
described by
resource (128, purgeable) {
kBorderFrame,
btnOutlineSize,
noShadow,
noShadowPen,
btnOutlineRound,
blackOutline,
btnMargin
};
to a CButton should produce the standard default-button outline,
but I've had no occasion to try it.
* SADerez doesn't work on my system, and therefore this header has
never been tried with SA[De]Rez. My only experience is with
MPW 3.2 Rez/DeRez.
* The definition for 'Pano' and its descendants makes it easy to define
and DeRez panoramas whose bounds rectangles are declared to be the same
height and width as are declared at the beginning of the resource (first
two integers). The up side to this is that it is the rational thing to do,
and it cuts some redundant information out of Rez files. The down
side is that existing resources whose bounds rects do not match the Panorama
dimensions get DeRezed as unformatted hex. Also, if you have been
using that bounds rect for purposes of your own, the definitions here won't
support you.
* Booleans are defined as 0/256 instead of 0/1 for compatibility with ResEdit.
* Much of this could be made neater with defter use of #defines, but I'd rather
debug code than resource scripts.
*/
type 'Estr' as 'STR ';
type 'View' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
};
type 'Pane' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
/* Pane-specific */
width:
integer; /* Pane width */
height:
integer; /* Pane height */
integer; /* Horiz. offset in enclosure */
integer; /* Horiz. offset in enclosure */
integer sizFIXEDLEFT, /* Fixed length, anchored to left */
sizFIXEDRIGHT, /* Fixed length, anchored to right */
sizFIXEDSTICKY = 4, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer sizFIXEDTOP = 2, /* Fixed length, anchored to top */
sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
sizFIXEDSTICKY, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer noAutoRefresh,
autoRefresh = 256; /* Auto-refresh */
integer clipAPERTURE,
clipFRAME,
clipPAGE; /* Print clipping */
};
type 'ScPn' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
width:
integer; /* Pane width */
height:
integer; /* Pane height */
integer; /* Horiz. offset in enclosure */
integer; /* Horiz. offset in enclosure */
integer sizFIXEDLEFT, /* Fixed length, anchored to left */
sizFIXEDRIGHT, /* Fixed length, anchored to right */
sizFIXEDSTICKY = 4, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer sizFIXEDTOP = 2, /* Fixed length, anchored to top */
sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
sizFIXEDSTICKY, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer noAutoRefresh,
autoRefresh = 256; /* Auto-refresh */
integer clipAPERTURE,
clipFRAME,
clipPAGE; /* Print clipping */
/* ScrollPane-specific */
point stepOneUnit = { 1, 1 }; /* Single step */
point overlapOneUnit = { 1, 1 }; /* Paging overlap */
integer noHorizBar,
hasHorizBar = 256; /* Horizontal scroll bar */
integer noVertBar,
hasVertBar = 256; /* Vertical scroll bar */
integer noSizeBox,
hasSizeBox = 256; /* Size box */
};
type 'Pano' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
width:
integer; /* Pane width */
height:
integer; /* Pane height */
integer; /* Horiz. offset in enclosure */
integer; /* Horiz. offset in enclosure */
integer sizFIXEDLEFT, /* Fixed length, anchored to left */
sizFIXEDRIGHT, /* Fixed length, anchored to right */
sizFIXEDSTICKY = 4, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer sizFIXEDTOP = 2, /* Fixed length, anchored to top */
sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
sizFIXEDSTICKY, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer noAutoRefresh,
autoRefresh = 256; /* Auto-refresh */
integer clipAPERTURE,
clipFRAME,
clipPAGE; /* Print clipping */
/* Panorama-specific */
vOffset:
integer zeroVOrigin;
hOffset:
integer zeroHOrigin;
integer = $$Word(vOffset) + $$Word(height);
integer = $$Word(hOffset) + $$Word(width); /* Bounds */
integer noHScaling = 1; /* Horiz. Scaling */
integer noVScaling = 1; /* Vert. Scaling */
point notScrolled = { 0, 0 }; /* Position */
};
type 'AbTx' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
width:
integer; /* Pane width */
height:
integer; /* Pane height */
integer; /* Horiz. offset in enclosure */
integer; /* Horiz. offset in enclosure */
integer sizFIXEDLEFT, /* Fixed length, anchored to left */
sizFIXEDRIGHT, /* Fixed length, anchored to right */
sizFIXEDSTICKY = 4, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer sizFIXEDTOP = 2, /* Fixed length, anchored to top */
sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
sizFIXEDSTICKY, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer noAutoRefresh,
autoRefresh = 256; /* Auto-refresh */
integer clipAPERTURE,
clipFRAME,
clipPAGE; /* Print clipping */
vOffset:
integer zeroVOrigin;
hOffset:
integer zeroHOrigin;
integer = $$Word(vOffset) + $$Word(height);
integer = $$Word(hOffset) + $$Word(width); /* Bounds */
integer noHScaling = 1; /* Horiz. Scaling */
integer noVScaling = 1; /* Vert. Scaling */
point notScrolled = { 0, 0 }; /* Position */
/* Text-specific */
integer usePaneWidth = -1; /* Line width */
integer wholeLines = 256,
partialLinesOK = 0; /* wholeLines */
integer isEditable = 256,
isNotEditable = 0;
integer isStyleable = 256,
isNotStyleable = 0;
};
type 'DlTx' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
width:
integer; /* Pane width */
height:
integer; /* Pane height */
integer; /* Horiz. offset in enclosure */
integer; /* Horiz. offset in enclosure */
integer sizFIXEDLEFT, /* Fixed length, anchored to left */
sizFIXEDRIGHT, /* Fixed length, anchored to right */
sizFIXEDSTICKY = 4, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer sizFIXEDTOP = 2, /* Fixed length, anchored to top */
sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
sizFIXEDSTICKY, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer noAutoRefresh,
autoRefresh = 256; /* Auto-refresh */
integer clipAPERTURE,
clipFRAME,
clipPAGE; /* Print clipping */
vOffset:
integer zeroVOrigin;
hOffset:
integer zeroHOrigin;
integer = $$Word(vOffset) + $$Word(height);
integer = $$Word(hOffset) + $$Word(width); /* Bounds */
integer noHScaling = 1; /* Horiz. Scaling */
integer noVScaling = 1; /* Vert. Scaling */
point notScrolled = { 0, 0 }; /* Position */
integer usePaneWidth = -1; /* Line width */
integer wholeLines = 256,
partialLinesOK = 0; /* wholeLines */
integer isEditable = 256,
isNotEditable = 0;
integer isStyleable = 256,
isNotStyleable = 0;
/* DialogText-specific */
integer isRequired = 256,
isNotRequired = 0;
integer doValidate = 256,
doNotValidate = 0;
longint infinite = 0x7FFFFFFF,
str255 = 255; /* Max length */
};
/* Table selection flags */
#define selOnlyOne 1L /* only one cell can be selected at a time */
#define selNoDisjoint 2L /* no disjoint selections allowed */
#define selExtendDrag 4L /* extend selections by selecting hit cells */
/* not by extending rectangles */
#define selDragRects 8L /* dragging always selects rectangles */
type 'Tabl' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
width:
integer; /* Pane width */
height:
integer; /* Pane height */
integer; /* Horiz. offset in enclosure */
integer; /* Horiz. offset in enclosure */
integer sizFIXEDLEFT, /* Fixed length, anchored to left */
sizFIXEDRIGHT, /* Fixed length, anchored to right */
sizFIXEDSTICKY = 4, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer sizFIXEDTOP = 2, /* Fixed length, anchored to top */
sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
sizFIXEDSTICKY, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer noAutoRefresh,
autoRefresh = 256; /* Auto-refresh */
integer clipAPERTURE,
clipFRAME,
clipPAGE; /* Print clipping */
vOffset:
integer zeroVOrigin;
hOffset:
integer zeroHOrigin;
integer = $$Word(vOffset) + $$Word(height);
integer = $$Word(hOffset) + $$Word(width); /* Bounds */
integer noHScaling = 1; /* Horiz. Scaling */
integer noVScaling = 1; /* Vert. Scaling */
point notScrolled = { 0, 0 }; /* Position */
/* Table-specific */
integer; /* NumRows */
integer; /* rowHeight */
integer; /* numCols */
integer; /* colWidth */
hex longint; /* selection flags */
longint cmdNull, cmdQuit, cmdNew, cmdOpen, cmdClose,
cmdSave, cmdSaveAs, cmdRevert, cmdPageSetup, cmdPrint,
cmdClear = 21, cmdSelectAll = 23 cmdOK = 100, cmdCancel,
cmdAbout = 256;
integer noActiveBorder, activeBorder = 256;
integer noRowBorder, rowBorder1;
integer patCopy = 8, patOr, patXor, patBic, notPatCopy,
notPatOr, notPatXor, notPatBic;
integer rowBorderBlack;
integer noColBorder, colBorder1;
integer patCopy = 8, patOr, patXor, patBic, notPatCopy,
notPatOr, notPatXor, notPatBic;
integer colBorderBlack;
};
type 'PctP' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
width:
integer; /* Pane width */
height:
integer; /* Pane height */
integer; /* Horiz. offset in enclosure */
integer; /* Horiz. offset in enclosure */
integer sizFIXEDLEFT, /* Fixed length, anchored to left */
sizFIXEDRIGHT, /* Fixed length, anchored to right */
sizFIXEDSTICKY = 4, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer sizFIXEDTOP = 2, /* Fixed length, anchored to top */
sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
sizFIXEDSTICKY, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer noAutoRefresh,
autoRefresh = 256; /* Auto-refresh */
integer clipAPERTURE,
clipFRAME,
clipPAGE; /* Print clipping */
/* Panorama-specific */
vOffset:
integer zeroVOrigin;
hOffset:
integer zeroHOrigin;
integer = $$Word(vOffset) + $$Word(height);
integer = $$Word(hOffset) + $$Word(width); /* Bounds */
integer noHScaling = 1; /* Horiz. Scaling */
integer noVScaling = 1; /* Vert. Scaling */
point notScrolled = { 0, 0 }; /* Position */
/* Picture-specific */
integer; /* ResID */
integer doNotScale, scale = 256;
};
type 'Popm' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
/* Pane-specific */
width:
integer; /* Pane width */
height:
integer; /* Pane height */
integer; /* Horiz. offset in enclosure */
integer; /* Horiz. offset in enclosure */
integer sizFIXEDLEFT, /* Fixed length, anchored to left */
sizFIXEDRIGHT, /* Fixed length, anchored to right */
sizFIXEDSTICKY = 4, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer sizFIXEDTOP = 2, /* Fixed length, anchored to top */
sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
sizFIXEDSTICKY, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer noAutoRefresh,
autoRefresh = 256; /* Auto-refresh */
integer clipAPERTURE,
clipFRAME,
clipPAGE; /* Print clipping */
/* Popup-specific */
integer; /* Menu resID */
integer doNotAutoSelect, autoSelect = 256;
integer selectOnlyOne, multiSelect;
};
type 'StdP' {
integer isVisible = 256, notVisible = 0;
integer isActive = 256, notActive = 0;
integer wantsClicks = 256, doesntWantClicks = 0;
/* Pane-specific */
width:
integer; /* Pane width */
height:
integer; /* Pane height */
integer; /* Horiz. offset in enclosure */
integer; /* Horiz. offset in enclosure */
integer sizFIXEDLEFT, /* Fixed length, anchored to left */
sizFIXEDRIGHT, /* Fixed length, anchored to right */
sizFIXEDSTICKY = 4, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer sizFIXEDTOP = 2, /* Fixed length, anchored to top */
sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
sizFIXEDSTICKY, /* Fixed length, sticks to coords */
/* of its enclosure */
sizELASTIC; /* Variable length, always a fixed */
/* amount smaller than enclosure */
integer noAutoRefresh,
autoRefresh = 256; /* Auto-refresh */
integer clipAPERTURE,
clipFRAME,
clipPAGE; /* Print clipping */
/* Popup-specific */
integer; /* Menu resID */
integer doNotAutoSelect, autoSelect = 256;
integer selectOnlyOne, multiSelect;
/* StdPopup-specific */
integer noHAutosize, hAutosize = 256;
integer noVAutosize, vAutosize = 256;
};
/* Border flags */
#define kBorderNone 0x00
#define kBorderLeft 0x01
#define kBorderTop 0x02
#define kBorderRight 0x04
#define kBorderBottom 0x08
#define kBorderFrame (kBorderLeft+kBorderTop+kBorderRight+kBorderBottom)
#define kBorderOval 0x10
#define kBorderRoundRect 0x20
#define kBorderRsrv1 0x40
#define kBorderRsrv2 0x80
type 'PBrd' {
hex longint; /* Flags */
point standardSize = { 1, 1 },
btnOutlineSize = { 3, 3 }; /* PenSize */
point noShadow = { 0, 0 },
offset2 = { 2, 2 }; /* Shadow offset */
point noShadowPen = { 0, 0 },
shadowPen1 = { 1, 1 },
shadowPen2 = { 2, 2 }; /* Shadow pen size */
point notRound = { 0, 0 },
round4 = { 4, 4 },
btnOutlineRound = { 16, 16 }; /* Roundness */
integer blackOutline = 0; /* 'PAT ' id for outline */
rect noMargin = { 0, 0, 0, 0 },
oneMargin = { -1, -1, 1, 1 },
btnMargin = { -4, -4, 4, 4 }; /* Margin */
};